#ifndef MTNODE_H
#define MTNODE_H

#include <string>
#include <vector>
#include "CodeGenContext.hpp"

namespace MathematicaTranslator {

	class MTExpression;
	class MTStatement;
	class MTVariableDeclaration;
	class MTVariableDefinition;
	class MTList;

	typedef std::vector<MTExpression*> ExpressionList;
	typedef std::vector<MTStatement*> StatementList;
	typedef std::vector<MTVariableDefinition*> VariableList;
	typedef std::vector<MTVariableDeclaration*> DeclaredVariableList;
	typedef std::vector<MTList*> Matrix;

	/**
	  * Base class for AST 
	  * \note generateCode() will be turn to pure virtual 
	  */
	class MTNode {
	protected:
		/// Temporary variables count used to indicate which variable comes next
		static long int tmpVariableCount;
		/// Common suffix
		const static std::string tmpVariable; 
	public:
		MTNode() {}
		virtual ~MTNode() {}
		/**  
		  *  Main method to print the result of translating into C++ from Mathematica 
		  * \param context current variable context 
		  * \return allocated string with translation
		  */
		virtual std::string* generateCode(CodeGenContext& context);
	};

}
#endif
